﻿using Game.Map;
using Game.Map.Extensions;
using Game.PathFinder;

namespace Game.Actions
{
    public class DestructContainer : GameAction
    {
        readonly IMapField _Field;

        public DestructContainer(IMapField field)
        {
            _Field = field;
        }

        protected override ActionResult Execute(Common.GameTurn turn, Context context)
        {
            context.ActionExecutor.Start(turn);

            _Field.VehicleX().Vehicle = null;

            return base.Execute(turn, context);
        }
    }
}
